from app.models.artist import Artist
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
import os
import logging

class ArtistPage(webapp.RequestHandler):
    def get(self, artist_code, *args):
        artist = Artist.get_by_code(int(artist_code))
        template_values = {
            'artist': artist
        }
        path = os.path.join(os.path.dirname(__file__), '../../views/artist/artist_details.html')
        self.response.out.write(template.render(path, template_values))
        